<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="org.springframework.security.ui.AbstractProcessingFilter"%>
<%
	String path = request.getContextPath();
	Object reason = request.getParameter("reason");
	String message = "";

	Object e = session.getAttribute(AbstractProcessingFilter.SPRING_SECURITY_LAST_EXCEPTION_KEY);
	if(e instanceof DisabledException) {
		message = "您的账户已经被禁用";
	}
	else if(reason!=null && "auth-failure".equals(reason.toString())) {
		message = "您输入的用户名或密码不正确";
	} 
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">


<%@page import="org.springframework.security.DisabledException"%>
<html>
	<head>
<!--		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />-->
		<meta http-equiv="content-type" content="text/html; charset=gb2312" />
		<link href="<%=path%>/css/base.css" rel="stylesheet" type="text/css" />
		<link href="<%=path%>/css/style.css" rel="stylesheet" type="text/css" />
		<title>北京市电子行政监察平台-登录</title>
		<style type="text/css">
			html, body {
				background-color: #98B5CC;
			}
			
			#loginBoard {
				width: 100%;
				height: 768px;
				margin: 0 auto;
				background: url('<%=path%>/image/login_bg_color.gif') repeat-x;
				padding-top: 85px;
			}
			
			#loginBtn {
				width: 71px;
				height: 70px;
				border: none;
				cursor: pointer;
				background: url('<%=path%>/image/login_btn.gif');
			}
			
			#loginForm {
				width: 1016px;
				height: 575px;
				margin: 0 auto;
				background: url('<%=path%>/image/login_board.gif') repeat-x;
				padding-top: 283px;
			}
			
			#loginTable {
				width: 100%;
			}
			
			td.input-td {
				text-align: right;
				width: 589px;
				padding-top: 3px;
			}
			
			#loginTable input.shadow {
				width: 172px;
				height: 25px;
				line-height: 25px;
			}
		</style>
	</head>
	<body>
		<div id="loginBoard">
			<div>
				<form action="<%=path%>/j_spring_security_check" method="post" id="loginForm">
					<table id="loginTable">
						<tbody>
							<tr>
								<td colspan="2" valign="top" style="text-align: center;font-size: 16px;color: #ff0000;height: 20px;">
									<%= message %>
								</td>
							</tr>
							<tr>
								<td valign="top"  class="input-td">
									<input type="text" name="j_username" class="shadow" tabindex="1"/>
								</td>
								<td rowspan="2" valign="top" style="padding-left: 22px;">
									<input type="submit" value=" " id="loginBtn" tabindex="3"/>
								</td>
							</tr>
							<tr>
								<td valign="top" class="input-td">
									<input type="password" name="j_password" class="shadow" tabindex="2"/>
								</td>
							</tr>
						</tbody>
					</table>
				</form>
			</div>
		</div>
	</body>
</html>